/*
 * 创建人： Created by  on 2020/12/3.
 * 创建时间：Created by  on 2020/12/3.
 * 页面说明：
 * 可关注公众号：我的大前端生涯   获取最新技术分享
 * 可关注网易云课堂：https://study.163.com/instructor/1021406098.htm
 * 可关注博客：https://blog.csdn.net/zl18603543572
 */

class ExamineUserBean {
  int id;
  int userId;
  int configId;
  String examineEndTime;
  String examineBeginTime;
  num examineStandard;
  String statisticsTime;
  num examineStatues;
  String userRealName;
  String examineContent;
  String createTime;
  num examineStaType;
  num examineScore;
  num examineCount;
  num examineCountValid;
  num examineAvg;
  num examineMin;
  num examineMax;

  ExamineBean examineConfig;

  ///常用用于解析JSON数据
  ExamineUserBean.fromMap(Map<String, dynamic> map) {
    if (map != null) {
      this.examineEndTime = map["examineEndTime"] ?? "--";
      this.examineBeginTime = map["examineBeginTime"] ?? "--";
      this.statisticsTime = map["statisticsTime"] ?? "--";
      this.examineStandard = map["examineStandard"] ?? 0;
      this.userId = map["userId"] ?? 0;
      this.configId = map["configId"] ?? 0;
      this.examineCountValid = map["examineCountValid"] ?? 0;

      this.userRealName = map["userRealName"] ?? "--";
      this.examineContent = map["examineContent"] ?? "--";
      this.createTime = map["createTime"] ?? "--";

      this.examineStaType = map["examineStaType"] ?? 0;
      this.examineStatues = map["examineStatues"] ?? 0;

      this.examineScore = map["examineScore"] ?? 0;
      this.examineCount = map["examineCount"] ?? 0;

      this.examineAvg = map["examineAvg"] ?? 0;
      this.examineMin = map["examineMin"] ?? 0;
      this.examineMax = map["examineMax"] ?? 0;

      this.id = map["id"] ?? 0;

      if (map["examineConfig"] != null) {
        this.examineConfig = ExamineBean.fromMap(map["examineConfig"]);
      }
    }
  }
}

class ExamineBean {
  int id;
  String examineTitle;
  String examineStatuesStr;
  num examineType;
  num examineStatues;
  num examineStaType;

  String examineRule;

  ///常用用于解析JSON数据
  ExamineBean.fromMap(Map<String, dynamic> map) {
    if (map != null) {
      this.examineTitle = map["examineTitle"] ?? "--";
      this.examineRule = map["examineRule"] ?? "--";
      this.examineStaType = map["examineStaType"] ?? 0;
      this.examineStatues = map["examineStatues"] ?? 0;
      this.examineType = map["examineType"] ?? 0;
      //状态 0 未统计数据  1 统计中 2统计完成 4删除
      if (this.examineStatues == 0 || this.examineStatues == 1) {
        this.examineStatuesStr = "进行中";
      } else if (this.examineStatues == 2) {
        this.examineStatuesStr = "进行中";
      } else if (this.examineStatues == 3) {
        this.examineStatuesStr = "已结束";
      } else if (this.examineStatues == 4) {
        this.examineStatuesStr = "已作废";
      } else {
        this.examineStatuesStr = "--";
      }
      this.id = map["id"] ?? 0;
    }
  }
}
